<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
  <description>web</description>
  <display-name>web</display-name>
  <context-param>
    <param-name>org.operamasks.faces.IMPLICIT_NAVIGATION</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <param-name>org.operamasks.faces.COMPATIBLE_NOT_STRICT</param-name>
    <param-value>false</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.BUFFER_SIZE</param-name>
    <param-value>8192</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.REFRESH_PERIOD</param-name>
    <param-value>1</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
  </context-param>
  <!-- logj4 日志加载 -->
  <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>epm.root</param-value>
  </context-param>
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>/WEB-INF/log4j.properties</param-value>
  </context-param>
  <context-param>
    <param-name>log4jRefreshInterval</param-name>
    <param-value>30000</param-value>
  </context-param>
  <!-- spring 配置文件 -->
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring/applicationContext-*.xml</param-value>
  </context-param>
  <context-param>
    <param-name>facelets.LIBRARIES</param-name>
    <param-value>/epm.taglib.xml</param-value>
  </context-param>
  <!-- SaveState配置时间 -->
  <context-param>
    <param-name>CONVERSATION_TIMEOUT</param-name>
    <param-value>3600</param-value>
  </context-param>
  <!--
		<filter> <filter-name>checkLoginFilter</filter-name>
		<filter-class>com.base.common.CheckLoginFilter</filter-class>
		</filter>
	-->
  <!-- opensessioninview 处理延迟加载 -->
  <filter>
    <filter-name>openSessionInView</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
  </filter>
  <!-- spring security -->
  <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  </filter>
  <filter>
    <filter-name>DefaultSuffix Redirect Filter</filter-name>
    <filter-class>org.operamasks.faces.webapp.filter.DefaultSuffixRedirector</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>DefaultSuffix Redirect Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>openSessionInView</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
  </filter-mapping>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>ResourceServlet</servlet-name>
    <servlet-class>org.operamasks.faces.render.resource.ResourceServlet</servlet-class>
  </servlet>
  <!-- Attachment附件的上传和下载 -->
  <servlet>
    <servlet-name>downloadAttachment</servlet-name>
    <servlet-class>com.base.attachment.servlet.DownloadAttachmentServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>uploadAttachment</servlet-name>
    <servlet-class>com.base.attachment.servlet.UploadAttachmentServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>ResourceServlet</servlet-name>
    <url-pattern>/_global/*</url-pattern>
  </servlet-mapping>
  <!-- Attachment附件的上传和下载 -->
  <servlet-mapping>
    <servlet-name>downloadAttachment</servlet-name>
    <url-pattern>/downloadAttachment</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>uploadAttachment</servlet-name>
    <url-pattern>/uploadAttachment</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <!-- 500 服务器内部错误 -->
  <error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
  </error-page>
  <!-- 404 页面不存在错误 -->
  <error-page>
    <error-code>404</error-code>
    <location>/404.jsp</location>
  </error-page>
  <!-- 400错误 -->
  <error-page>
    <error-code>400</error-code>
    <location>/error.jsp</location>
  </error-page>
  <!-- java.lang.Exception异常错误,依据这个标记可定义多个类似错误提示 -->
  <error-page>
    <exception-type>java.lang.NullPointerException</exception-type>
    <location>/error.jsp</location>
  </error-page>
  <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.jsp</location>
  </error-page>
  <error-page>
    <exception-type>javax.faces.FacesException</exception-type>
    <location>/error.jsp</location>
  </error-page>
  <error-page>
    <exception-type>org.hibernate.HibernateException</exception-type>
    <location>/error.jsp</location>
  </error-page>
  <!-- log4j加载 -->
  <listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <!-- spring 加载 -->
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <!-- 配置加载，包括spring -->
  <listener>
    <listener-class>com.base.commons.listener.BpConfigLoader</listener-class>
  </listener>
  <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  </listener>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <servlet>
    <!-- Axis config -->
    <servlet-name>AxisServlet</servlet-name>
    <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>AdminServlet</servlet-name>
    <servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
    <load-on-startup>100</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>SOAPMonitorService</servlet-name>
    <servlet-class>org.apache.axis.monitor.SOAPMonitorService</servlet-class>
    <init-param>
      <param-name>SOAPMonitorPort</param-name>
      <param-value>5001</param-value>
    </init-param>
    <load-on-startup>100</load-on-startup>
  </servlet>
  <servlet>
    <display-name>saveProcess</display-name>
    <servlet-name>saveProcess</servlet-name>
    <servlet-class>com.process.servlet.SaveProcessServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/axis/servlet/AxisServlet</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>SOAPMonitorService</servlet-name>
    <url-pattern>/SOAPMonitor</url-pattern>
  </servlet-mapping>
  <!-- uncomment this if you want the admin servlet -->
  <servlet-mapping>
    <servlet-name>AdminServlet</servlet-name>
    <url-pattern>/axis/servlet/AdminServlet</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>saveProcess</servlet-name>
    <url-pattern>/saveProcess</url-pattern>
  </servlet-mapping>
</web-app>

